import React, { Component } from 'react'

class TotalPrice extends Component {
  constructor(props){
    super(props)
    this.state ={
      income: this.props.incomeTotal,
      outcome: this.props.outcomeTotal
    }
  }
  render() {
    const { income, outcome }  = this.state
    return(
      <div className="row">
        <div className="col">
          <h5 className="income">
          总收入：<span>{income}</span>
          </h5>
          </div>
        <div className="col">
          <h5 className="outcome">
          总支出：<span>{outcome}</span>
          </h5>
          </div>
      </div>
    )
  }
}

export default TotalPrice